<div class="center-block col-md-12">
	<form id="swiftNewForm" class="form-horizontal">
		<!-- 					  	<input id="swiftId" type="text" class="hidden"  name ="id" > -->

		<div class="form-group">
			<!--col-sm-*   1-12  页面虚拟12列                             设置label位置、div宽度-->
			<label for="funName" class="col-xs-2 col-sm-2 control-label">业务名称</label>
			<div class="col-xs-9 col-sm-4 ">
				<input type="text" class="form-control" id="funName" name="funName"
					placeholder="业务名称" value="">
			</div>
			<label for="funId" class="col-xs-2 col-sm-2 control-label">业务唯一编码</label>
			<div class="col-xs-9 col-sm-4">
				<input type="text" class="form-control" id="funId" name="funId"
					placeholder="业务唯一编码" value="">
			</div>
		</div>

		<div class="form-group">
			<label for="dbName" class="col-sm-2 col-xs-2 control-label">数据源选择</label>
			<div class="col-xs-9 col-sm-4">
				<select class="form-control" name="dbName">
					<option id="" class="" value="data0">数据源（根据key值获取）</option>
					<option id="" class="" value="fweb_db">fweb_db</option>
					<option id="" class="" value="data1">数据源1</option>
					<option id="" class="" value="data2">数据源2</option>
					<option id="" class="" value="data3">数据源3</option>
					<option id="" class="" value="data4">数据源4</option>
				</select>
			</div>

			<label for="" class="col-sm-2 col-xs-2 control-label">资源路径</label>
			<div class="col-xs-9 col-sm-4">
				<select class="form-control">
					<option id="" class="" value=""></option>
					<option id="" class="" value="test/fweb_0">test/fweb_0</option>
					<option id="" class="" value="test/fweb_1">test/fweb_1</option>
				</select>
			</div>
		</div>

		<div class="form-group">
			<!--col-sm-*   1-12  页面虚拟12列                             设置label位置、div宽度-->
			<label for="templetType" class="col-xs-2 col-sm-2 control-label">模板类型</label>
			<div class="col-xs-9 col-sm-4">
				<select class="form-control" name="templetType">
					<option id="" class="" value="easy2">简单2</option>
					<option id="" class="" value="general">普通的</option>
					<option id="" class="" value="easy3">简单3</option>
				</select>
			</div>
			<label for="template" class="col-xs-2 col-sm-2 control-label">类型</label>
			<div class="col-xs-9 col-sm-4">
				<span id="templateName" class="form-control">普通模板</span>
			</div>
		</div>
		<button type="button" id="NewSwiftSave"
			class="btn btn-primary center-block col-sm-4 col-xs-3">保存</button>
	</form>
</div>
<script type="text/javascript">
var swiftId=null;
//新建业务模块  
$("#NewSwiftSave").click(function(){
	console.log("点击 #NewSwiftSave");
	var swift = $("#swiftNewForm").serializeObject();
	if(swift!=null&& swiftId!=""){
		swift.id=swiftId;
	}
	console.log(swift);
	 $.ajax({
            url:'/swift/config/baseinfo/saveSwift',
			type : 'POST',
			cache : false,
			data : $.toJSON(swift),
			contentType : 'application/json;charset=UTF-8',
            success:function(data){
            	initSwiftTree();
            }
        });
});
//新建业务模块   end

</script>